home *** CD-ROM | disk | FTP | other *** search
/ Champak 43 / Vol 43.iso / games / phit.swf / scripts / __Packages / CDebugWindow.as < prev    next >
Encoding:
Text File  |  2007-07-13  |  672 b   |  35 lines

  1. class CDebugWindow extends MovieClip
  2. {
  3.    var _traceText;
  4.    function CDebugWindow()
  5.    {
  6.       super();
  7.       _root._debugWindow = this;
  8.       Key.addListener(this);
  9.       this.HideLog();
  10.    }
  11.    function Trace(msg, tag)
  12.    {
  13.       this._traceText.text += msg + "\n";
  14.    }
  15.    function onKeyUp()
  16.    {
  17.       if(_global._dbgTraceEnabled && Key.isDown(17) && Key.isDown(16) && Key.getCode() == 33)
  18.       {
  19.          this.ToggleLog();
  20.       }
  21.    }
  22.    function ShowLog()
  23.    {
  24.       this._visible = true;
  25.    }
  26.    function HideLog()
  27.    {
  28.       this._visible = false;
  29.    }
  30.    function ToggleLog()
  31.    {
  32.       this._visible = !this._visible;
  33.    }
  34. }
  35.